function checkFrm() {

}
var options = {
    type: "post",
    dataType: "json",
    beforeSubmit: checkFrm,
    url: ajaxAddUrl,
    success: function (data) {
        dialog.alert(data.msg);
        if (data.flag) {
            window.location.href = listUrl;
        }
    }
};
$("#addFrm").ajaxForm(options);